home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / GDIDEMO.PAK / BITBLT.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  1KB  |  51 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
  4. //
  5. //   BitBlt demo window header
  6. //----------------------------------------------------------------------------
  7. #if !defined(BITBLT_H)
  8. #define BITBLT_H
  9.  
  10. #include "demobase.h"
  11. class _EXPCLASS TBitmap;
  12.  
  13. // BitBlt demo constants 
  14. const int BackgroundId       = 100; // Bitmap ID of background bitmap 
  15. const int ShipId             = 101; // Bitmap ID of Ship Bitmap 
  16. const int MonoShipId         = 102; // Bitmap ID of Monochrome mask of ship 
  17. const int BitmapSize         = 72;  // Size of Ship bitmap 
  18.  
  19. class TBitBltWindow : public TBaseDemoWindow {
  20.   public:
  21.     TBitBltWindow();
  22.     ~TBitBltWindow();
  23.  
  24.   protected:
  25.     void    SetupWindow();
  26.     void    TimerTick();
  27.     void    EvSize(uint SizeType, TSize& Size);
  28.     void    Paint(TDC& dc, bool, TRect&);
  29.  
  30.   private:
  31.     TPoint      WindowSize;
  32.     TBitmap*    ScratchBitmap;
  33.     TBitmap*    StretchedBkgnd;
  34.     TBitmap*    Background;
  35.     TBitmap*    MonoShip;
  36.     TBitmap*    Ship;
  37.     int         OldX;
  38.     int         OldY;
  39.     int         Delta;
  40.     int         X;
  41.     int         Y;
  42.     int         CurClick;
  43.  
  44.     void        CalculateNewXY();
  45.  
  46.   DECLARE_RESPONSE_TABLE(TBitBltWindow);
  47.   DECLARE_CASTABLE;
  48. };
  49.  
  50. #endif  //  BITBLT_H
  51.